package com.hnkywl.sts.entity.xsgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.sfgl.Sfk;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: ccr
 * Date: 14-1-2
 * Time: 下午2:22
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_BIZ_DFKXSD")
@Where(clause = "deleted!='1'")
public class Dfkxsd extends BaseEntity {

    @Id
    @SequenceGenerator(name = "seqDfkxsd", allocationSize = 1, sequenceName = "SEQ_BIZ_DFKXSD")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqDfkxsd")
    private Long id;

    @Column(name = "order_id")
    private Long orderId;

    @Column(name = "order_sn")
    private String orderSn;

    private Double amount;

    private String memberCode;

    private String salerCode;

    private String message;

    private Long lockSerialNumber;

    private Long unlockSerialNumber;

    //锁定付款
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SDFK_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sfk sdfk;

    //销售收款
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSSK_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Sfk xssk;

    //销售单
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "XSD_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Xsd xsd;

    private String bz;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public String getMemberCode() {
        return memberCode;
    }

    public void setMemberCode(String memberCode) {
        this.memberCode = memberCode;
    }

    public String getSalerCode() {
        return salerCode;
    }

    public void setSalerCode(String salerCode) {
        this.salerCode = salerCode;
    }

    public Long getLockSerialNumber() {
        return lockSerialNumber;
    }

    public void setLockSerialNumber(Long lockSerialNumber) {
        this.lockSerialNumber = lockSerialNumber;
    }

    public Long getUnlockSerialNumber() {
        return unlockSerialNumber;
    }

    public void setUnlockSerialNumber(Long unlockSerialNumber) {
        this.unlockSerialNumber = unlockSerialNumber;
    }

    public Sfk getSdfk() {
        return sdfk;
    }

    public void setSdfk(Sfk sdfk) {
        this.sdfk = sdfk;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Sfk getXssk() {
        return xssk;
    }

    public void setXssk(Sfk xssk) {
        this.xssk = xssk;
    }

    public Xsd getXsd() {
        return xsd;
    }

    public void setXsd(Xsd xsd) {
        this.xsd = xsd;
    }
}
